1. Field of the Invention
The present invention relates to a 3D shape measurement method and a device using the same, whereby the 3D shape of an object is measured by a phase shift method.
2. Description of Related Art
Sometimes measurement of the 3D shape of an object is necessary in various fields. As a measurement method in such a case, there is a laser beam scanning method, however, in this method, a great deal of laser irradiation and image photography are necessary in proportion to the resolution. This method therefore has long measurement times.
Therefore, as a method by which a 3D shape is measured at a high speed with high accuracy, the phase shift method has come to be noticed. In this method, an optical intensity pattern (typically, a sine wave-shaped pattern) following a periodic function is projected in time series while changing the phase. An image of the object is picked-up and used to determine the 3D shape of the object.
Among (X, Y, Z) of the 3D shape of the object, the plane coordinates of X and Y are easily determined from the picked-up image (projection plane). However, the Z coordinate (that is, depth) is not easily determined.
Referring to the prior art technique in FIG. 8, the phase value xcfx86 is determined. Then, since the positional relationship between the image pickup means such as a camera and the projection means such as a projector is known, based on the principle of triangulation, the Z coordinate is determined from the phase value xcfx86. In other words, if only the phase value xcfx86 is uniformly determined, the Z coordinate is also uniformly determined, whereby the 3D shape of the object is specified.
However, in the prior-art method, for the reasons mentioned below, the phase value xcfx86 has inconstancy (referred to as xe2x80x9cperiodic inconstancyxe2x80x9d in this specification) of integral multiples of the period (2xcfx80 in the case of sine waves). As a result, the phase value xcfx86, and consequently the value of the Z coordinate, cannot be uniformly determined.
As shown in FIG. 8, the projection means D is equipped with a light source D1 and a display means D2 such as a liquid crystal panel. An optical intensity pattern in accordance with the abovementioned conditions are applied to the display means D2. Light from the light source D1 is transmitted through the display means D2 and projected toward an object O. A camera C, used as an image pickup means, has a projection plane A and an optical axis AX perpendicularly penetrating the center of this projection plane A.
Now, a certain measurement point on the object O is positioned at the point P (u, v) on the projection plane A. The XY coordinates of the measurement point is easily determined from the transverse coordinates (u, v). When considering the Z, or depth, coordinate, it is clearly understood that the measurement point may be located at any position along the line of sight L passing through the point P (u, v). In other words, it is said that the Z coordinate on the line of sight L is one of a group of calculated solutions of the Z coordinate (the number of solutions is infinite).
On supposition that the number of repetitions of image pickup is N. When employing sine waves as a periodic function, the phase to be shifted per repetition is 2xcfx80/N (n=0, 1, 2, . . . , Nxe2x88x921). The image pickup time tn is defined to be 2xcfx80n/N.
At this time, if the luminance at the coordinates (u, v) in the camera image is defined as In (u, v), in order to prevent the value of luminance of the pattern from becoming negative, the luminance bias (texture image) Ibias is set according to the following formula.                               I          bias                =                              ∑                          n              =              0                                      N              -              1                                ⁢                      xe2x80x83                    ⁢                                    I              n                        ⁡                          (                              u                ,                v                            )                                                          (                  Formula          ⁢                      xe2x80x83                    ⁢          1                )            
The phase value xcfx86 (u, v) to be determined is expressed by the following formula.                               φ          ⁡                      (                          u              ,              v                        )                          =                  -                                                    ∑                                  n                  =                  0                                                  N                  -                  1                                            ⁢                              xe2x80x83                            ⁢                                                                    2                    ⁢                    π                                    N                                ⁢                                                      I                    n                                    ⁡                                      (                                          u                      ,                      v                                        )                                                  ⁢                sin                ⁢                                  xe2x80x83                                ⁢                tn                                                                    ∑                                  n                  =                  0                                                  N                  -                  1                                            ⁢                              xe2x80x83                            ⁢                                                                    2                    ⁢                    π                                    N                                ⁢                                                      I                    n                                    ⁡                                      (                                          u                      ,                      v                                        )                                                  ⁢                cos                ⁢                                  xe2x80x83                                ⁢                tn                                                                        (                  Formula          ⁢                      xe2x80x83                    ⁢          2                )            
As is clearly understood from (Formula 2), the phase value xcfx86 (u, v) has a range from xe2x88x92xcfx80 to xcfx80. Furthermore, even if xcfx86+2xcfx80m (m is an integer) is substituted for xcfx86, the Formulas stand up in the same way. That is, the phase value xcfx86 has periodic inconstancy of 2 xcfx80 per period. In addition, even when a different periodic function is used, the periodic inconstancy is inevitable as long as the function is a periodic function.
The result, as shown in FIG. 8, is that the group of infinite solutions of the calculated Z coordinate on the line of sight L is reduced to the group of a finite number of solutions (in the illustrated example, Z coordinates at the points Q1 through Q7). However, which solution is the true Z coordinate at the noticed point cannot be determined from this group.
Herein, the number of solutions in the group (7 in the example of FIG. 8) is the number of stripes in the optical intensity pattern, and the number of stripes is in inverse proportion to the wavelength of the periodic function. One possibility to avoid the abovementioned inconstancy is to increase the wavelength of the periodic function by reducing the number of stripes (typically, reduce the number to 1). However, in such a method, measurement accuracy is degraded, so that the method is not practicable.
The invention is made in view of the above circumstances, and the object thereof is to provide a 3D shape measurement method and a device using the same, whereby harmful influences of the periodic inconstancy is eliminated while maintaining measurement accuracy.
In the invention, a plurality of optical intensity patterns following periodic functions with varying wavelengths are projected onto an object so as not to interfere with each other. The least common multiple of the wavelengths of the periodic functions is larger than the extent having periodic inconstancy within a prescribed area.
By this construction, the wavelengths are made sufficiently short, and measurement accuracy is maintained. At the same time, even if each wavelength is short, the least common multiple is larger than the extent having the periodic inconstancy, so that the next periodic inconstancy is outside the prescribed area.
According to the invention, harmful influences of periodic inconstancy, which is inevitable in 3D measurement using the phase shift method, is eliminated, so that a highly-reliable measurement at a high speed is achieved. The foregoing and other features and advantages of the present invention will become more readily more appreciated as the same is better understood by reference to the following detailed description when taken into conjunction with the accompanying drawings.